/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aplet;

import graphlayout.GLPanel;
import graphlayout.UsingXPath;
import graphlayout.UsingXPath_fases;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.io.File;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JMenuItem;

/**
 *
 * @author USUARIO
 */
public class Prueba_japlet extends javax.swing.JApplet {

    /**
     * Initializes the applet Prueba_japle
     */
    public String gettext3;
    //public String direccion="C:\\Users\\USUARIO\\Google Drive\\9noCiclo\\GP3.2\\propuestaXML02_VDC_V2.xml";
    public String direccion;
    public String nombre_proyecto;

    @Override
    public void init() {                       
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Prueba_japlet.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Prueba_japlet.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Prueba_japlet.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Prueba_japlet.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

//        add(new GLPanel(), BorderLayout.CENTER);
        try {
            java.awt.EventQueue.invokeAndWait(new Runnable() {               

                public void run() {
                    initComponents();                    
                    jMenu1.setText("File");
                    jMenuItem1.setText("Abrir");                    
                    jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
                        

                        public void actionPerformed(java.awt.event.ActionEvent evt) {
                            try {                                
                                HashMap origen_destino = new HashMap();
                               jMenuItem1ActionPerformed(evt);

                               jPanel1.setLayout(new BorderLayout());
                               jPanel1.setSize(800, 600);                               
                               jPanel1.add(new GLPanel(direccion), BorderLayout.CENTER);                                                             
//                               jLabel10.setText(nombre_proyecto); 
                               jTextField1.setText(nombre_proyecto);
                               String nodos_o_d = get_relation_todos();                              
                               jTextArea4.setText(nodos_o_d);
                               

                              fase_inicio.setEnabled(true);
                              fase_planificacion.setEnabled(true);
                              fase_ejecucion.setEnabled(true);
                              todos.setEnabled(true);
//                              jLabel10.setEnabled(true);
//                              jTextField1.setEnabled(true);
                                         
                    fases.add(fase_inicio);
                    fases.add(fase_planificacion);
                    fases.add(fase_ejecucion);
                    fases.add(todos);
                    todos.setSelected(true);
                    
                    fase_inicio.addActionListener(new java.awt.event.ActionListener() {
                    public void actionPerformed(java.awt.event.ActionEvent evt) {
                        jradioInicio(evt);
                    }

                        public void jradioInicio(ActionEvent evt) {
                            try{
                               //UsingXPath_fases ux=new UsingXPath_fases(direccion,"Fase Inicio");
                               // JOptionPane.showMessageDialog(null, "Fase inicio");                                
                               jTextArea2.setText("");
                               jTextArea3.setText("");
                               jTextArea4.setText("");
                               
                                jPanel1.removeAll();                               
                                jPanel1.setLayout(new BorderLayout());
                               jPanel1.setSize(800, 600);
                               jPanel1.repaint();                              
                               jPanel1.add(new GLPanel(direccion,"Fase Inicio"), BorderLayout.CENTER);
                               
                               String nodos_o_d = get_relation("Fase Inicio");                              
                               if(nodos_o_d.equals("") || nodos_o_d==null){
                                   String texto4="";
                                   texto4+="--------------NO EXISTEN RELACIONES--------------\n";
                                   String aux_texto4=nombre_nodos("Fase Inicio");
                                   texto4+=aux_texto4;
                                   jTextArea4.setText(texto4);
                               }else{
                                   jTextArea4.setText(nodos_o_d);
                               }                               
                               
                                //ux.inicio_consultas();
                            }catch(Exception ex){
                                System.out.println(ex.getMessage());
                            }
                           // JOptionPane.showMessageDialog(null, "Fase Inicio");
                        }
                    });
                    
                    
                    fase_planificacion.addActionListener(new java.awt.event.ActionListener() {
                    public void actionPerformed(java.awt.event.ActionEvent evt) {
                        jradioPlanificacion(evt);
                    }

                        public void jradioPlanificacion(ActionEvent evt) {                            
                            try{
                                jTextArea2.setText("");
                               jTextArea3.setText("");
                               jTextArea4.setText("");
                               jPanel1.removeAll();
                                jPanel1.setLayout(new BorderLayout());
                               jPanel1.setSize(800, 600);
                               jPanel1.repaint();                              
                               jPanel1.add(new GLPanel(direccion,"Fase Planificacion"), BorderLayout.CENTER);
                               
                               String nodos_o_d = get_relation("Fase Planificacion");                              
                               if(nodos_o_d.equals("") || nodos_o_d==null){
                                   String texto4="";
                                   texto4+="--------------NO EXISTEN RELACIONES--------------\n";
                                   String aux_texto4=nombre_nodos("Fase Planificacion");
                                   texto4+=aux_texto4;
                                   jTextArea4.setText(texto4);
                               }else{
                                   jTextArea4.setText(nodos_o_d);
                               }
                               
                                //ux.inicio_consultas();
                            }catch(Exception ex){
                                System.out.println(ex.getMessage());
                            }                            
                            //JOptionPane.showMessageDialog(null, "Fase Planificacion");
                        }
                    });                    
                    
                    fase_ejecucion.addActionListener(new java.awt.event.ActionListener() {
                    public void actionPerformed(java.awt.event.ActionEvent evt) {
                        jradioEjecucion(evt);
                    }

                        public void jradioEjecucion(ActionEvent evt) {
                            try{
                               jTextArea2.setText("");
                               jTextArea3.setText("");
                               jTextArea4.setText("");                                
                               jPanel1.removeAll();
                                jPanel1.setLayout(new BorderLayout());
                               jPanel1.setSize(800, 600);
                               jPanel1.repaint();                              
                               jPanel1.add(new GLPanel(direccion,"Fase Ejecucion"), BorderLayout.CENTER);                               
                               
                               String nodos_o_d = get_relation("Fase Ejecucion");                              
                               if(nodos_o_d.equals("") || nodos_o_d==null){
                                   String texto4="";
                                   texto4+="--------------NO EXISTEN RELACIONES--------------\n";
                                   String aux_texto4=nombre_nodos("Fase Ejecucion");
                                   texto4+=aux_texto4;
                                   jTextArea4.setText(texto4);
                               }else{
                                   jTextArea4.setText(nodos_o_d);
                               }                                                                                              
                            }catch(Exception ex){
                                System.out.println(ex.getMessage());
                            }                                                        
                        }
                    });                
                    
                    todos.addActionListener(new java.awt.event.ActionListener() {
                    public void actionPerformed(java.awt.event.ActionEvent evt) {
                        jradioTodos(evt);
                    }

                        public  void jradioTodos(ActionEvent evt) {                            
                            //JOptionPane.showMessageDialog(null, "Todos");
                               jTextArea2.setText("");
                               jTextArea3.setText("");
                               jTextArea4.setText("");
                               
                                jPanel1.removeAll();
                               jPanel1.setLayout(new BorderLayout());
                               jPanel1.setSize(800, 600);
                               jPanel1.add(new GLPanel(direccion), BorderLayout.CENTER);
                                                             
                               String nodos_o_d = get_relation_todos();                              
                               jTextArea4.setText(nodos_o_d);                            
                        }
                    });                                
                                                                                             
                            } catch (Exception ex) {
                                Logger.getLogger(Prueba_japlet.class.getName()).log(Level.SEVERE, null, ex);
                            }
//                            } catch (IOException ex) {
//                                Logger.getLogger(Prueba_japlet.class.getName()).log(Level.SEVERE, null, ex);
//                            } catch (SAXException ex) {
//                                Logger.getLogger(Prueba_japlet.class.getName()).log(Level.SEVERE, null, ex);
//                            } catch (XPathExpressionException ex) {
//                                Logger.getLogger(Prueba_japlet.class.getName()).log(Level.SEVERE, null, ex);
//                            }
                        }                                                
                    });                                                        
                    jMenu1.add(jMenuItem1);
                    jMenu2.setText("");
                }
                public String get_relation(String fase){
                        String nodos_o_d="";
                        HashMap origen_destino = new HashMap(); 
                        try{
                               UsingXPath_fases ux = new UsingXPath_fases(direccion,fase);
                               ux.inicio_consultas();
                              origen_destino = ux.get_origen_destino();
                               Set set = origen_destino.entrySet();
                               Iterator i = set.iterator();
                               while (i.hasNext()) {
                                   try {
                                       Map.Entry me = (Map.Entry) i.next();
                                       nodos_o_d += me.getKey() + " => " + me.getValue() + "\n";
                                   } catch (Exception ex) {
                                       System.out.println(ex.getMessage());
                                   }
                               }
                        }catch(Exception ex){
                            System.out.println(ex.getMessage());
                        }                               
                               return nodos_o_d;
                    }
                
                    public String nombre_nodos(String fase) {
                        String nombres="";
                        HashMap nombre_nodos = new HashMap(); 
                        try{
                               UsingXPath_fases ux = new UsingXPath_fases(direccion,fase);
                               ux.inicio_consultas();
                              nombre_nodos = ux.get_nombre_nodos_id();
                               Set set = nombre_nodos.entrySet();
                               Iterator i = set.iterator();
                               while (i.hasNext()) {
                                   try {
                                       Map.Entry me = (Map.Entry) i.next();
                                       nombres += me.getKey()+"\n";
                                   } catch (Exception ex) {
                                       System.out.println(ex.getMessage());
                                   }
                               }
                        }catch(Exception ex){
                            System.out.println(ex.getMessage());
                        }                               
                        
                        return nombres;
                    }
                
                public String get_relation_todos(){
                        String nodos_o_d="";
                        HashMap origen_destino = new HashMap(); 
                        try{
                               UsingXPath ux = new UsingXPath(direccion);
                               ux.inicio_consultas();
                              origen_destino = ux.get_origen_destino();
                               Set set = origen_destino.entrySet();
                               Iterator i = set.iterator();
                               while (i.hasNext()) {
                                   try {
                                       Map.Entry me = (Map.Entry) i.next();
                                       nodos_o_d += me.getKey() + " => " + me.getValue() + "\n";
                                   } catch (Exception ex) {
                                       System.out.println(ex.getMessage());
                                   }
                               }
                        }catch(Exception ex){
                            System.out.println(ex.getMessage());
                        }                               
                               return nodos_o_d;
                    }                
            });
        } catch (Exception ex) {
            ex.printStackTrace();
        }


    }    

    public void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {
        direccion=jTextArea1.getText();
        String aux="propuestaXML02_VDC_V2.xml";
        //String aux =direccion;
        nombre_proyecto=aux;
       // fc.getName(null);
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jFrame1 = new javax.swing.JFrame();
        jMenu5 = new javax.swing.JMenu();
        fases = new javax.swing.ButtonGroup();
        jMenuItem1 = new javax.swing.JMenuItem();
        jPanel1 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTextArea2 = new javax.swing.JTextArea();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTextArea3 = new javax.swing.JTextArea();
        jScrollPane4 = new javax.swing.JScrollPane();
        jTextArea4 = new javax.swing.JTextArea();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jButton2 = new javax.swing.JButton();
        fase_inicio = new javax.swing.JRadioButton();
        fase_planificacion = new javax.swing.JRadioButton();
        fase_ejecucion = new javax.swing.JRadioButton();
        todos = new javax.swing.JRadioButton();
        jLabel5 = new javax.swing.JLabel();
        jTextField1 = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenu2 = new javax.swing.JMenu();

        javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane());
        jFrame1.getContentPane().setLayout(jFrame1Layout);
        jFrame1Layout.setHorizontalGroup(
            jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        jFrame1Layout.setVerticalGroup(
            jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );

        jMenu5.setText("jMenu5");

        jMenuItem1.setText("jMenuItem1");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 611, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );

        jTextArea2.setColumns(20);
        jTextArea2.setRows(5);
        jTextArea2.setDisabledTextColor(new java.awt.Color(0, 0, 0));
        jTextArea2.setEnabled(false);
        jScrollPane2.setViewportView(jTextArea2);

        jTextArea3.setColumns(20);
        jTextArea3.setRows(5);
        jTextArea3.setDisabledTextColor(new java.awt.Color(0, 0, 0));
        jTextArea3.setEnabled(false);
        jScrollPane3.setViewportView(jTextArea3);

        jTextArea4.setColumns(20);
        jTextArea4.setRows(5);
        jTextArea4.setDisabledTextColor(new java.awt.Color(0, 0, 0));
        jTextArea4.setEnabled(false);
        jScrollPane4.setViewportView(jTextArea4);

        jLabel1.setFont(new java.awt.Font("Verdana", 1, 10)); // NOI18N
        jLabel1.setForeground(new java.awt.Color(0, 0, 153));
        jLabel1.setText("PROYECTO Y FASES");

        jLabel2.setFont(new java.awt.Font("Verdana", 1, 11)); // NOI18N
        jLabel2.setForeground(new java.awt.Color(0, 0, 153));
        jLabel2.setText("RELACIONES DE NODOS");

        jLabel3.setFont(new java.awt.Font("Verdana", 1, 11)); // NOI18N
        jLabel3.setForeground(new java.awt.Color(0, 0, 153));
        jLabel3.setText("GRAFICADOR");

        jLabel4.setFont(new java.awt.Font("Verdana", 1, 11)); // NOI18N
        jLabel4.setForeground(new java.awt.Color(0, 0, 153));
        jLabel4.setText("INFORMACION NODOS");

        jButton2.setText("MAS INFORMACION DEL NODO");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        fase_inicio.setText("Fase Inicio");
        fase_inicio.setEnabled(false);

        fase_planificacion.setText("Fase Planificacion");
        fase_planificacion.setEnabled(false);

        fase_ejecucion.setText("Fase Ejecucion");
        fase_ejecucion.setEnabled(false);
        fase_ejecucion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                fase_ejecucionActionPerformed(evt);
            }
        });

        todos.setText("Todos");
        todos.setEnabled(false);

        jLabel5.setFont(new java.awt.Font("Tahoma", 3, 11)); // NOI18N
        jLabel5.setText("Nombre Proyecto: ");

        jTextField1.setText("project_name");
        jTextField1.setDisabledTextColor(new java.awt.Color(0, 0, 0));
        jTextField1.setEnabled(false);

        jLabel6.setFont(new java.awt.Font("Verdana", 1, 10)); // NOI18N
        jLabel6.setForeground(new java.awt.Color(0, 0, 153));
        jLabel6.setText("INGRESE LA DIRECCION DEL ARCHIVO");

        jTextArea1.setColumns(20);
        jTextArea1.setRows(5);
        jScrollPane1.setViewportView(jTextArea1);

        jMenu1.setText("File");
        jMenuBar1.add(jMenu1);

        jMenu2.setText("Edit");
        jMenuBar1.add(jMenu2);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel5)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(fase_planificacion)
                            .addComponent(fase_ejecucion)
                            .addComponent(todos)
                            .addComponent(fase_inicio)
                            .addComponent(jLabel6)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 231, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jLabel1))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(337, 337, 337)
                        .addComponent(jLabel3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel4)
                        .addGap(37, 37, 37))
                    .addGroup(layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane2)
                            .addComponent(jScrollPane3)
                            .addComponent(jScrollPane4)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel2)
                                    .addComponent(jButton2))
                                .addGap(0, 0, Short.MAX_VALUE)))))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(jLabel4))
                .addGap(6, 6, 6)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGap(45, 45, 45))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton2)
                        .addGap(11, 11, 11)
                        .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(24, Short.MAX_VALUE))))
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel6)
                .addGap(9, 9, 9)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel5)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(fase_inicio)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(fase_planificacion)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(fase_ejecucion)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(todos)
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        jTextArea3.setVisible(true);
    }//GEN-LAST:event_jButton2ActionPerformed

    private void fase_ejecucionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fase_ejecucionActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_fase_ejecucionActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    public static javax.swing.JRadioButton fase_ejecucion;
    public static javax.swing.JRadioButton fase_inicio;
    public static javax.swing.JRadioButton fase_planificacion;
    private javax.swing.ButtonGroup fases;
    public static javax.swing.JButton jButton2;
    private javax.swing.JFrame jFrame1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu5;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JTextArea jTextArea1;
    public static javax.swing.JTextArea jTextArea2;
    public static javax.swing.JTextArea jTextArea3;
    private javax.swing.JTextArea jTextArea4;
    private javax.swing.JTextField jTextField1;
    public static javax.swing.JRadioButton todos;
    // End of variables declaration//GEN-END:variables

    public String datos_principales() {
        GLPanel gp = new GLPanel();
        String nombre = gp.nombre_proyecto;
        String s = "";
        s += nombre + "\n"; //se puede extraer el nombre del documento
        s += "*    Fase Inicio        \n";
        s += "*    Fase Planificacion \n";
        s += "*    Fase Ejecucion     \n";
        return s;

    }

    public void set_text2(String text) {
        jTextArea2.setText("");
        jTextArea2.setText(text);
        //jButton2.setEnabled(true);        
    }

    public void set_text3(String datos3) {
        jTextArea3.setText("");
        jTextArea3.setText(datos3);
        gettext3 = jTextArea3.getText();
        jTextArea3.setVisible(false);
    }
}